cmake_minimum_required(VERSION 3.8)

project(lqr_solver)

# Default to C++14
set(CMAKE_CXX_STANDARD 17)

# set python path
set(PYTHON_INCLUDE_DIR /usr/include/python3.10)
set(NUMPY_INCLUDE_DIR /usr/include/python3.10/numpy)

find_package(Eigen3 REQUIRED)
find_package(angles REQUIRED)

include_directories(
  include
  ${PYTHON_INCLUDE_DIR} 
  ${NUMPY_INCLUDE_DIR}
)

find_package(Eigen3 REQUIRED)

# 测试文件
add_executable(draw_traj 
  src/draw_traj.cpp
)
target_link_libraries(draw_traj python3.10)

add_executable(test_plot 
  src/test_plot.cpp
)
target_link_libraries(test_plot python3.10)

add_executable(lqr_sim 
  src/sim_lqr.cpp
)
target_link_libraries(lqr_sim 
  python3.10 
  Eigen3::Eigen 
  angles::angles
)

add_executable(lqr_smooth 
  src/sim_lqr_smooth.cpp
)
target_link_libraries(lqr_smooth 
  python3.10 
  Eigen3::Eigen 
  angles::angles
)